using System;
using System.Collections.Generic;
using System.Text;

using Microsoft.Xna.Framework;

namespace HadronData
{
    public class ContactPoint
    {
        private Vector2 m_vecPosition, m_vecNormal;

        public ContactPoint(Vector2 p_vecPosition, Vector2 p_vecNormal)
        {
            m_vecPosition = p_vecPosition;
            m_vecNormal = p_vecNormal;
        }

        public void Transform(Transformation p_transformation)
        {
            m_vecPosition = p_transformation.Apply(m_vecPosition);
            m_vecNormal = p_transformation.RotationComponent.Apply(m_vecNormal);
        }

        public void Invert()
        {
            m_vecNormal = -m_vecNormal;
        }

        public Vector2 Position
        {
            get { return m_vecPosition; }
        }

        public Vector2 Normal
        {
            get { return m_vecNormal; }
        }
    }
}
